/**************************************************************************************************
* Title: SimulationManager.h
* Authors: Gael Huber
* Description: Manages the actual game
**************************************************************************************************/
#ifndef __SIMULATIONMANAGER_H__
#define __SIMULATIONMANAGER_H__

#include <stdio.h>
#include <time.h>
#include <Windows.h>
#include <vector>

#include "SmurfsEntity.h"
#include "SmurfsRenderManager.h"
#include "SmurfsPhysicsManager.h"
#include "SmurfsInputManager.h"
#include "SmurfsSingleton.h"

#define MAX_ENTITIES 750

class SimulationManager : public Singleton<SimulationManager> {
public:
	SimulationManager(void);	// Constructor
	~SimulationManager(void);	// Destructor

	void startUp(void);	// Initialize
	void shutDown(void);	// Shutdown

	static SimulationManager& getSingleton(void);	// Get the singleton instance
	static SimulationManager* getSingletonPtr(void);	// Get the singleton pointer

	void gameLoop(void);	// Update

	Entity* getBar(void);	// Get bar
private:
	void createBar(void);		// Create the bar
	void createPivot(void);		// Create the pivot point
	void createSpring(void);	// Create the spring
	void setupScenario(void);	// Make sure the scenario is set up appropriately

	std::vector<Entity*> entityList;	// all entities on the screen

	// smurfs managers (singletons)
	RenderManager* renderManager;
	PhysicsManager* physicsManager;
	InputManager* inputManager;

	Entity* bar;			// Bar
	Spring* spring;			// Spring
	Spring* pivot;			// Pivot

	Vector3 startPos;		// Starting position of the whole system
};

#endif